package ModelLayer;

/**
 * Write a description of class Product here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Product
{
    private int barCode;
    private String productName;
    private double price;
    private String location;
    private double weight;
    private int stockQuantity;
        //     private double discount;

    public Product(int barCode, String productName, double price, String location, double weight, int quantity)
    {
        this.barCode = barCode;
        this.productName = productName;
        this.price = price;
        this.location = location;
        this.weight = weight;
        this.stockQuantity = stockQuantity;
        //         this.discount = discount;
    }

    //SETTERS

    public void setBarCode(int newBarCode)
    {
        barCode = newBarCode;
    }

    public void setProductName(String newName)
    {
        productName = newName;
    }

    public void setPrice(double newPrice)
    {
        price = newPrice;
    }

    public void setLocation(String newLocation)
    {
        location = newLocation;
    }

    public void setWeight(double newWeight)
    {
        weight = newWeight;
    }

    public void setQuantity(int newQuantity)
    {
        stockQuantity = newQuantity;
    }
        //     
        //     public void setDiscount(double myDiscount)
        //     {
        //         discount = myDiscount;
        //     }

    //GETTERS

    public int getBarCode()
    {
        return barCode;
    }

    public String getProductName()
    {
        return productName;
    }

    public double getPrice()
    {
        return price;
    }

    public String getLocation()
    {
        return location;
    }

    public double getWeight()
    {
        return weight;
    }

    public int getQuantity()
    {
        return stockQuantity;
    }
        //     
        //     public double getDiscount()
        //     {
        //         return discount;
        //     }

    //--------------------------

    public boolean increaseQuantity(int increment)
    {
        if(increment>0)
        {

            stockQuantity+=increment;
            return true;
        }
        else
        {
            return false;
        }
    }

}
